package DemoPackage;

// 介绍嵌套子元素的Task

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;

import java.util.ArrayList;

public class DemoContainerTask extends Task {

    private String name;

    private ArrayList args = new ArrayList();

    @Override
    public void execute() throws BuildException {
        log("Message: " + "Parameter name is " + this.name, Project.MSG_INFO);
        log("Message: " + "Nested Element Parameter args is " + this.args.toString(), Project.MSG_INFO);
    }

    public void setName(String name) {
        this.name = name;
    }

    public void addArgs(Arg arg){
        this.args.add(arg);
    }


}
